Skip to content

Fix: Draw the Windows caption buttons on the GraalVM path - #340

Merged
b-re-w merged 4 commits into
developfrom
feat/windows-caption-buttons
Oct 26, 2026
Merged

b-re-w merged 4 commits into
developfrom
feat/windows-caption-buttons

Conversation

@b-re-w

@b-re-w b-re-w commented Oct 25, 2026

Copy link
Copy Markdown
Member

Closes #339

Cause: renderer/desktop/src/Win32Window.kt (GraalVM, what ships) opened the window without dxc_native_window_configure (the fork defaulted system_chrome to 0, so WM_NCCALCSIZE took the caption strip) and composed ComposeRustContent(host) with no WindowCaption and no LocalWindowActions, so WindowButtons (ComposeRustHost.kt, drawn only when caption.height > 0 and actions exist) never appeared. The Kotlin/Native mingwX64 path (renderer/windows/src/WindowsRenderer.kt) was already wired.

  • GraalVM path: configures from the app's Chrome, provides caption (32dp) and nativeWindowActions().
  • WindowActions.maximised state, updated per frame from user32 IsZoomed on both Windows paths (written only on change, no idle frames); maximise draws restore while maximised.
  • CaptionStyle.pressed / closePressed; Fluent: OnSurface 12% pressed, close hover #C42B1C with white glyph, close pressed at 90%.
  • windows-caption-metrics.test.sh also reads win32_caption.h (fork Feat: Make the X11 window the Linux default, without the Windows work (NFR-14) #172 moved the defines there).
  • Tests: WindowsCaptionButtonsTest (glyph switch, 46x32, fills in light and dark, Restore description).

Fork side: thisisthepy/compose-multiplatform-core-extended#172 (safe default, HTMAXBUTTON for Snap Layouts, pure hit test with 96/144/192 dpi tests). This PR does not depend on the pin bump to compile (only existing fork symbols plus user32 IsZoomed); Snap Layouts arrives with the pin (#336). Not compiled locally; CI builds.

The GraalVM Windows window never called dxc_native_window_configure and composed
ComposeRustContent with no caption and no window actions, so the fork window took
the caption strip and nothing drew the buttons. Configure the window from the
app's Chrome and hand the caption and actions over, as the Kotlin/Native path does.
Buttons gain a pressed fill (Fluent: Windows 11 values) and a restore glyph read
from IsZoomed on both Windows paths.

Closes #339
@b-re-w b-re-w added the run-heavy-ci Run the heavy CI workflows on this pull request's head label Oct 25, 2026
…into feat/windows-caption-buttons

# Conflicts:
#	scripts/tests/windows-caption-metrics.test.sh
@b-re-w

b-re-w commented Oct 26, 2026

Copy link
Copy Markdown
Member Author

인계 메모 (pF 세션 종료, 2026-10-26). 작업 브랜치는 모두 커밋, 푸시되어 있다. 머지 규칙: 이 PR이 고친다고 하는 것을 증명하는 체크가 현재 헤드에서 초록일 때만 머지한다.

상태: CI 대기 중(Graal 캡션 버튼). v0.0.4 차단 항목.
다음: Windows 캡션 버튼 관련 잡이 헤드에서 초록이면 머지. #342와 함께 머지되면 develop에 0.0.4 버전 올림 PR을 열고 리더에게 알린다(main, 태그, crates.io는 리더).

@b-re-w
b-re-w merged commit c53ed2b into develop Oct 26, 2026
36 checks passed
@b-re-w
b-re-w deleted the feat/windows-caption-buttons branch November 12, 2026 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-heavy-ci Run the heavy CI workflows on this pull request's head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant